home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / SocketServices.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  24.0 KB  |  794 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        SocketServices.a
  3. ;
  4. ;    Contains:    This file contains constants and data structures that
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1994-1998 by Apple Computer, Inc. All rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__SOCKETSERVICES__') = 'UNDEFINED' THEN
  18. __SOCKETSERVICES__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  24.     include 'MixedMode.a'
  25.     ENDIF
  26.  
  27.  
  28. ;  ///////////////////////////////////////////////////////////////////////////////////////
  29. ;      TypeDefs for the Socket Services function codes
  30.  
  31.  
  32.  
  33. ; typedef Byte                             SS_BYTE
  34.  
  35. ; typedef Byte                             SS_FLAGS8
  36.  
  37. ; typedef Byte                             SS_IRQ
  38.  
  39. ; typedef Byte                             SS_PWRLEVEL
  40.  
  41. ; typedef UInt16                         SS_ADAPTER
  42.  
  43. ; typedef UInt16                         SS_BCD
  44.  
  45. ; typedef UInt16                         SS_COUNT
  46.  
  47. ; typedef UInt16                         SS_EDC
  48.  
  49. ; typedef UInt16                         SS_FLAGS16
  50.  
  51. ; typedef UInt16                         SS_PAGE
  52.  
  53. ; typedef UInt16                         SS_PWRINDEX
  54.  
  55. ; typedef UInt16                         SS_SIGNATURE
  56.  
  57. ; typedef UInt16                         SS_SKTBITS
  58.  
  59. ; typedef UInt16                         SS_SOCKET
  60.  
  61. ; typedef UInt16                         SS_SPEED
  62.  
  63. ; typedef UInt16                         SS_WINDOW
  64.  
  65. ; typedef UInt16                         SS_WORD
  66.  
  67. ; typedef UInt32                         SS_BASE
  68.  
  69. ; typedef UInt32                         SS_FLAGS32
  70.  
  71. ; typedef UInt32                         SS_OFFSET
  72.  
  73. ; typedef UInt32                         SS_SIZE
  74.  
  75. ; typedef Ptr                             SS_PTR
  76.  
  77. ; typedef OSErr                         SS_RETCODE
  78.  
  79. SS_SCHARTBL                RECORD 0
  80. sktCaps                     ds.w    1                ; offset: $0 (0)        ;     SS_FLAGS16
  81. activeHigh                 ds.l    1                ; offset: $2 (2)        ;     SS_FLAGS32
  82. activeLow                 ds.l    1                ; offset: $6 (6)        ;     SS_FLAGS32
  83. sizeof                     EQU *                    ; size:   $A (10)
  84.                         ENDR
  85. SS_SISTRUCT                RECORD 0
  86. bufferLength             ds.w    1                ; offset: $0 (0)        ;     SS_WORD
  87. dataLength                 ds.w    1                ; offset: $2 (2)        ;     SS_WORD
  88. charTable                 ds        SS_SCHARTBL        ; offset: $4 (4)        ;     SS_FLAGS16
  89. sizeof                     EQU *                    ; size:   $E (14)
  90.                         ENDR
  91.  
  92. STR_SIZE                        EQU        24
  93. ;  minimum string length
  94. SS_VISTRUCT                RECORD 0
  95. bufferLength             ds.w    1                ; offset: $0 (0)        ;     SS_WORD
  96. dataLength                 ds.w    1                ; offset: $2 (2)        ;     SS_WORD
  97. szImplementor             ds.b    1                ; offset: $4 (4) <-- really an array of length one ;     SS_WORD
  98. padding                     ds.b    1                ; offset: $5 (5) <-- really an array of length one ;     
  99. sizeof                     EQU *                    ; size:   $6 (6)
  100.                         ENDR
  101. SS_ACHARTBL                RECORD 0
  102. adpCaps                     ds.w    1                ; offset: $0 (0)        ;     SS_FLAGS16
  103. activeHigh                 ds.l    1                ; offset: $2 (2)        ;     SS_FLAGS32
  104. activeLow                 ds.l    1                ; offset: $6 (6)        ;     SS_FLAGS32
  105. sizeof                     EQU *                    ; size:   $A (10)
  106.                         ENDR
  107. SS_PWRENTRY                RECORD 0
  108. powerLevel                 ds.b    1                ; offset: $0 (0)        ;     SS_PWRLEVEL
  109. validSignals             ds.b    1                ; offset: $1 (1)        ;     SS_FLAGS8
  110. sizeof                     EQU *                    ; size:   $2 (2)
  111.                         ENDR
  112. SS_AISTRUCT                RECORD 0
  113. bufferLength             ds.w    1                ; offset: $0 (0)        ;     SS_WORD
  114. dataLength                 ds.w    1                ; offset: $2 (2)        ;     SS_WORD
  115. charTable                 ds        SS_ACHARTBL        ; offset: $4 (4)
  116. numPwrEntries             ds.w    1                ; offset: $E (14)        ;     SS_WORD
  117. pwrEntryPtr                 ds.l    1                ; offset: $10 (16)
  118. sizeof                     EQU *                    ; size:   $14 (20)
  119.                         ENDR
  120. SS_MEMWINTBL            RECORD 0
  121. memWndCaps                 ds.w    1                ; offset: $0 (0)        ;     SS_FLAGS16
  122. firstByte                 ds.l    1                ; offset: $2 (2)        ;     SS_BASE
  123. lastByte                 ds.l    1                ; offset: $6 (6)        ;     SS_BASE
  124. minSize                     ds.l    1                ; offset: $A (10)        ;     SS_SIZE
  125. maxSize                     ds.l    1                ; offset: $E (14)        ;     SS_SIZE
  126. reqGran                     ds.l    1                ; offset: $12 (18)        ;     SS_SIZE
  127. reqBase                     ds.l    1                ; offset: $16 (22)        ;     SS_SIZE
  128. reqOffset                 ds.l    1                ; offset: $1A (26)        ;     SS_SIZE
  129. slowest                     ds.w    1                ; offset: $1E (30)        ;     SS_SPEED
  130. fastest                     ds.w    1                ; offset: $20 (32)        ;     SS_SPEED
  131. sizeof                     EQU *                    ; size:   $22 (34)
  132.                         ENDR
  133. SS_IOWINTBL                RECORD 0
  134. ioWndCaps                 ds.w    1                ; offset: $0 (0)        ;     SS_FLAGS16
  135. firstByte                 ds.l    1                ; offset: $2 (2)        ;     SS_BASE
  136. lastByte                 ds.l    1                ; offset: $6 (6)        ;     SS_BASE
  137. minSize                     ds.l    1                ; offset: $A (10)        ;     SS_SIZE
  138. maxSize                     ds.l    1                ; offset: $E (14)        ;     SS_SIZE
  139. reqGran                     ds.l    1                ; offset: $12 (18)        ;     SS_SIZE
  140. addrLines                 ds.w    1                ; offset: $16 (22)        ;     SS_COUNT
  141. eisaSlot                 ds.b    1                ; offset: $18 (24)        ;     SS_FLAGS8
  142. padding                     ds.b    1                ; offset: $19 (25) <-- really an array of length one ;     
  143. sizeof                     EQU *                    ; size:   $1A (26)
  144.                         ENDR
  145. SS_WISTRUCT                RECORD 0
  146. bufferLength             ds.w    1                ; offset: $0 (0)        ;     SS_WORD
  147. dataLength                 ds.w    1                ; offset: $2 (2)        ;     SS_WORD
  148. numTblEntries             ds.w    1                ; offset: $4 (4)        ;     SS_WORD
  149. memWinTbl                 ds        SS_MEMWINTBL    ; offset: $6 (6)
  150. ioWinTbl                 ds        SS_IOWINTBL        ; offset: $28 (40)
  151. sizeof                     EQU *                    ; size:   $42 (66)
  152.                         ENDR
  153.  
  154. ; ————————————————————————————————————————————————————————————————————————
  155. ;    function selectors passed to Socket Service entry point
  156. ;————————————————————————————————————————————————————————————————————————
  157.  
  158.  
  159. fnSSGetAdapterCount                EQU        $80
  160. fnSSUnsupported81                EQU        $81
  161. fnSSUnsupported82                EQU        $82
  162. fnSSGetSSInfo                    EQU        $83
  163. fnSSInquireAdapter                EQU        $84
  164. fnSSGetAdapter                    EQU        $85
  165. fnSSSetAdapter                    EQU        $86
  166. fnSSInquireWindow                EQU        $87
  167. fnSSGetWindow                    EQU        $88
  168. fnSSSetWindow                    EQU        $89
  169. fnSSGetPage                        EQU        $8A
  170. fnSSSetPage                        EQU        $8B
  171. fnSSInquireSocket                EQU        $8C
  172. fnSSGetSocket                    EQU        $8D
  173. fnSSSetSocket                    EQU        $8E
  174. fnSSGetStatus                    EQU        $8F
  175. fnSSResetSocket                    EQU        $90
  176. fnSSUnsupported91                EQU        $91
  177. fnSSUnsupported92                EQU        $92
  178. fnSSUnsupported93                EQU        $93
  179. fnSSUnsupported94                EQU        $94
  180. fnSSInquireEDC                    EQU        $95
  181. fnSSGetEDC                        EQU        $96
  182. fnSSSetEDC                        EQU        $97
  183. fnSSStartEDC                    EQU        $98
  184. fnSSPauseEDC                    EQU        $99
  185. fnSSResumeEDC                    EQU        $9A
  186. fnSSStopEDC                        EQU        $9B
  187. fnSSReadEDC                        EQU        $9C
  188. fnSSGetVendorInfo                EQU        $9D
  189. fnSSAcknowledgeInterrupt        EQU        $9E
  190. fnSSGetSetPriorHandler            EQU        $9F
  191. fnSSGetSetSSAddr                EQU        $A0
  192. fnSSGetAccessOffsets            EQU        $A1
  193. fnSSUnsupportedA2                EQU        $A2
  194. fnSSUnsupportedA3                EQU        $A3
  195. fnSSUnsupportedA4                EQU        $A4
  196. fnSSUnsupportedA5                EQU        $A5
  197. fnSSUnsupportedA6                EQU        $A6
  198. fnSSUnsupportedA7                EQU        $A7
  199. fnSSUnsupportedA8                EQU        $A8
  200. fnSSUnsupportedA9                EQU        $A9
  201. fnSSUnsupportedAA                EQU        $AA
  202. fnSSUnsupportedAB                EQU        $AB
  203. fnSSUnsupportedAC                EQU        $AC
  204. fnSSUnsupportedAD                EQU        $AD
  205. fnSSVendorSpecific                EQU        $AE
  206. ;     SSVendorSpecificPB.function values
  207.  
  208.  
  209. fnVSReserved                    EQU        $00
  210. fnVSGetSocketLocationIcon        EQU        $01
  211. fnVSGetSocketLocationText        EQU        $02
  212. fnVSDoSocketLocalization        EQU        $03
  213. fnVSAppleSocketCapabilities        EQU        $04
  214. fnVSSleepWakeNotification        EQU        $05
  215.  
  216. ; ————————————————————————————————————————————————————————————————————————
  217. ;    defines for the Socket Services function codes
  218. ;————————————————————————————————————————————————————————————————————————
  219.  
  220.  
  221. AC_IND                            EQU        1                    ; adapter characteristics
  222. AC_PWR                            EQU        2
  223. AC_DBW                            EQU        4
  224.  
  225. AS_POWERDOWN                    EQU        1
  226. AS_MAINTAIN                        EQU        2
  227.  
  228. EC_UNI                            EQU        1
  229. EC_BI                            EQU        2
  230. EC_REGISTER                        EQU        4
  231. EC_MEMORY                        EQU        8
  232. EC_PAUSABLE                        EQU        16
  233. EC_WRITE                        EQU        16
  234.  
  235. ET_CHECK8                        EQU        1
  236. ET_SDLC16                        EQU        2
  237.  
  238. IF_MEMORY                        EQU        1
  239. IF_IO                            EQU        2
  240.  
  241. IRQ_HIGH                        EQU        64
  242. IRQ_ENABLE                        EQU        128
  243.  
  244. IRQ_MEMORY                        EQU        4
  245. IRQ_IO                            EQU        4
  246.  
  247. PS_ATTRIBUTE                    EQU        $01
  248. PS_ENABLED                        EQU        $02
  249. PS_WP                            EQU        $04
  250.  
  251. PWR_VCC                            EQU        128                    ; Power pins in PwrEntry elements
  252. PWR_VPP1                        EQU        64
  253. PWR_VPP2                        EQU        32
  254.  
  255. SBM_WP                            EQU        1
  256. SBM_LOCKED                        EQU        2
  257. SBM_EJECT                        EQU        4
  258. SBM_INSERT                        EQU        8
  259. SBM_BVD1                        EQU        16
  260. SBM_BVD2                        EQU        32
  261. SBM_RDYBSY                        EQU        64
  262. SBM_CD                            EQU        128
  263.  
  264. SBM_LOCK                        EQU        16
  265. SBM_BATT                        EQU        32
  266. SBM_BUSY                        EQU        64
  267. SBM_XIP                            EQU        128
  268. ;  Vendor Specific Apple Socket Capabilities 
  269.  
  270. SBM_SLEEP_PWR                    EQU        1
  271.  
  272. WC_COMMON                        EQU        1
  273. WC_IO                            EQU        2
  274. WC_ATTRIBUTE                    EQU        4
  275. WC_TYPE_MASK                    EQU        7
  276. WC_WAIT                            EQU        128
  277.  
  278. WC_BASE                            EQU        1
  279. WC_SIZE                            EQU        2
  280. WC_WENABLE                        EQU        4
  281. WC_8BIT                            EQU        8
  282. WC_16BIT                        EQU        16
  283. WC_BALIGN                        EQU        32
  284. WC_POW2                            EQU        64
  285. WC_CALIGN                        EQU        128
  286. WC_PAVAIL                        EQU        256
  287. WC_PSHARED                        EQU        512
  288. WC_PENABLE                        EQU        1024
  289. WC_WP                            EQU        2048
  290.  
  291. WC_INPACK                        EQU        128
  292. WC_EISA                            EQU        256
  293. WC_CENABLE                        EQU        512
  294.  
  295. WS_IO                            EQU        1
  296. WS_ENABLED                        EQU        2
  297. WS_16BIT                        EQU        4
  298.  
  299. WS_PAGED                        EQU        8
  300. WS_EISA                            EQU        16
  301. WS_CENABLE                        EQU        32
  302. WS_SWAP_LITTLE_TO_BIG_ENDIAN    EQU        64
  303.  
  304. SS_SIG_VALUE                    EQU        $5353                ; 'SS'
  305.  
  306. SS_CMPL_1_00                    EQU        $0100                ; compliant with rev 1.0 of SS standard
  307. SS_CMPL_1_01                    EQU        $0101                ; compliant with rev 1.01 of SS standard
  308. SS_CMPL_2_00                    EQU        $0200                ; compliant with rev 2.0 of SS standard
  309. SS_CMPL_2_10                    EQU        $0210                ; compliant with rev 2.1 of SS standard
  310. ; ————————————————————————————————————————————————————————————————————————
  311. ;    Universal ProcPtr for Socket Service entry point
  312. ;————————————————————————————————————————————————————————————————————————
  313.  
  314. ; ————————————————————————————————————————————————————————————————————————
  315. ;    Card Services calls used by a Socket Service
  316. ;————————————————————————————————————————————————————————————————————————
  317.  
  318. CSEventEntryPB            RECORD 0
  319. ssHandlerID                 ds.l    1                ; offset: $0 (0)
  320. adapter                     ds.w    1                ; offset: $4 (4)
  321. socket                     ds.w    1                ; offset: $6 (6)
  322. message                     ds.w    1                ; offset: $8 (8)
  323. intrpBits                 ds.b    1                ; offset: $A (10)
  324. padding                     ds.b    1                ; offset: $B (11)
  325. sizeof                     EQU *                    ; size:   $C (12)
  326.                         ENDR
  327. ; ------------        AddSocketServices        ------------                            
  328.  
  329. AddSocketServicesPB        RECORD 0
  330. ssEntry                     ds.l    1                ; offset: $0 (0)        ;  -> given to CS for its use
  331. csEntry                     ds.l    1                ; offset: $4 (4)        ;  <- taken from CS so we know where to enter
  332. dataPtr                     ds.l    1                ; offset: $8 (8)
  333. attributes                 ds.l    1                ; offset: $C (12)
  334. numAdapters                 ds.w    1                ; offset: $10 (16)
  335. numSockets                 ds.w    1                ; offset: $12 (18)
  336. sizeof                     EQU *                    ; size:   $14 (20)
  337.                         ENDR
  338. ; ------------         ReplaceSocketServices    ------------                            
  339.  
  340. ReplaceSocketServicesPB    RECORD 0
  341. ssEntry                     ds.l    1                ; offset: $0 (0)
  342. oldSSEntry                 ds.l    1                ; offset: $4 (4)
  343. dataPtr                     ds.l    1                ; offset: $8 (8)
  344. socket                     ds.w    1                ; offset: $C (12)
  345. numSockets                 ds.w    1                ; offset: $E (14)
  346. attributes                 ds.w    1                ; offset: $10 (16)
  347. sizeof                     EQU *                    ; size:   $12 (18)
  348.                         ENDR
  349. ;
  350. ; pascal OSErr CSAddSocketServices(AddSocketServicesPB *pb)
  351. ;
  352.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  353.         Macro
  354.         _CSAddSocketServices
  355.             moveq               #80,D0
  356.             dc.w                $AAF0
  357.         EndM
  358.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  359.         IMPORT_CFM_FUNCTION CSAddSocketServices
  360.     ENDIF
  361.  
  362. ;
  363. ; pascal OSErr CSReplaceSocketServices(ReplaceSocketServicesPB *pb)
  364. ;
  365.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  366.         Macro
  367.         _CSReplaceSocketServices
  368.             moveq               #81,D0
  369.             dc.w                $AAF0
  370.         EndM
  371.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  372.         IMPORT_CFM_FUNCTION CSReplaceSocketServices
  373.     ENDIF
  374.  
  375.  
  376.  
  377. ; ————————————————————————————————————————————————————————————————————————
  378. ;    parameter blocks for each Socket Service function
  379. ;————————————————————————————————————————————————————————————————————————
  380.  
  381. SSAcknowledgeInterruptPB RECORD 0
  382. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  383. sockets                     ds.w    1                ; offset: $2 (2)        ;     SS_SKTBITS
  384. sizeof                     EQU *                    ; size:   $4 (4)
  385.                         ENDR
  386. SSGetAccessOffsetsPB    RECORD 0
  387. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  388. mode                     ds.b    1                ; offset: $2 (2)        ;     SS_BYTE
  389. reserved                 ds.b    1                ; offset: $3 (3)        ;     padding
  390. count                     ds.w    1                ; offset: $4 (4)        ;     SS_COUNT
  391. buffer                     ds.l    1                ; offset: $6 (6)        ;     SS_PTR
  392. numAvail                 ds.w    1                ; offset: $A (10)        ;     SS_COUNT
  393. sizeof                     EQU *                    ; size:   $C (12)
  394.                         ENDR
  395. SSGetAdapterCountPB        RECORD 0
  396. totalAdapters             ds.w    1                ; offset: $0 (0)        ;     SS_COUNT
  397. sig                         ds.w    1                ; offset: $2 (2)        ;     SS_SIGNATURE
  398. sizeof                     EQU *                    ; size:   $4 (4)
  399.                         ENDR
  400. SSGetSetAdapterPB        RECORD 0
  401. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  402. state                     ds.b    1                ; offset: $2 (2)        ;     SS_FLAGS8
  403. irqStatus                 ds.b    1                ; offset: $3 (3)        ;     SS_IRQ
  404. sizeof                     EQU *                    ; size:   $4 (4)
  405.                         ENDR
  406. SSGetSetEDCPB            RECORD 0
  407. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  408. edc                         ds.w    1                ; offset: $2 (2)        ;     SS_EDC
  409. socket                     ds.w    1                ; offset: $4 (4)        ;     SS_SOCKET
  410. state                     ds.b    1                ; offset: $6 (6)        ;     SS_FLAGS8
  411. edcType                     ds.b    1                ; offset: $7 (7)        ;     SS_FLAGS8
  412. sizeof                     EQU *                    ; size:   $8 (8)
  413.                         ENDR
  414. SSGetSetPagePB            RECORD 0
  415. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  416. window                     ds.w    1                ; offset: $2 (2)        ;     SS_WINDOW
  417. page                     ds.w    1                ; offset: $4 (4)        ;     SS_PAGE
  418. state                     ds.b    1                ; offset: $6 (6)        ;     SS_FLAGS8
  419. reserved                 ds.b    1                ; offset: $7 (7)        ;     padding
  420. offset                     ds.l    1                ; offset: $8 (8)        ;     SS_OFFSET
  421. sizeof                     EQU *                    ; size:   $C (12)
  422.                         ENDR
  423. SSGetSetPriorHandlerPB    RECORD 0
  424. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  425. mode                     ds.b    1                ; offset: $2 (2)        ;     SS_FLAGS8
  426. reserved                 ds.b    1                ; offset: $3 (3)        ;     padding
  427. handler                     ds.l    1                ; offset: $4 (4)        ;     SS_PTR
  428. sizeof                     EQU *                    ; size:   $8 (8)
  429.                         ENDR
  430. SSGetSetSocketPB        RECORD 0
  431. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  432. socket                     ds.w    1                ; offset: $2 (2)        ;     SS_SOCKET
  433. vccIndex                 ds.w    1                ; offset: $4 (4)        ;     SS_PWRINDEX
  434. vpp1Index                 ds.w    1                ; offset: $6 (6)        ;     SS_PWRINDEX
  435. vpp2Index                 ds.w    1                ; offset: $8 (8)        ;     SS_PWRINDEX
  436. scIntMask                 ds.b    1                ; offset: $A (10)        ;     SS_FLAGS8
  437. state                     ds.b    1                ; offset: $B (11)        ;     SS_FLAGS8
  438. ctlInd                     ds.b    1                ; offset: $C (12)        ;     SS_FLAGS8
  439. ireqRouting                 ds.b    1                ; offset: $D (13)        ;     SS_IRQ
  440. ifType                     ds.b    1                ; offset: $E (14)        ;     SS_FLAGS8
  441. padding                     ds.b    1                ; offset: $F (15) <-- really an array of length one ;     
  442. sizeof                     EQU *                    ; size:   $10 (16)
  443.                         ENDR
  444. SSGetSetSSAddrPB        RECORD 0
  445. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  446. mode                     ds.b    1                ; offset: $2 (2)        ;     SS_BYTE
  447. subfunc                     ds.b    1                ; offset: $3 (3)        ;     SS_BYTE
  448. numAddData                 ds.w    1                ; offset: $4 (4)        ;     SS_COUNT
  449. buffer                     ds.l    1                ; offset: $6 (6)        ;     SS_PTR
  450. sizeof                     EQU *                    ; size:   $A (10)
  451.                         ENDR
  452. SSGetSetWindowPB        RECORD 0
  453. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  454. window                     ds.w    1                ; offset: $2 (2)        ;     SS_WINDOW
  455. socket                     ds.w    1                ; offset: $4 (4)        ;     SS_SOCKET
  456. size                     ds.l    1                ; offset: $6 (6)        ;     SS_SIZE
  457. state                     ds.b    1                ; offset: $A (10)        ;     SS_FLAGS8
  458. reserved                 ds.b    1                ; offset: $B (11)        ;     padding
  459. speed                     ds.w    1                ; offset: $C (12)        ;     SS_SPEED
  460. base                     ds.l    1                ; offset: $E (14)        ;     SS_BASE
  461. sizeof                     EQU *                    ; size:   $12 (18)
  462.                         ENDR
  463. SSGetSSInfoPB            RECORD 0
  464. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  465. compliance                 ds.w    1                ; offset: $2 (2)        ;     SS_BCD
  466. numAdapters                 ds.w    1                ; offset: $4 (4)        ;     SS_COUNT
  467. firstAdapter             ds.w    1                ; offset: $6 (6)        ;     SS_ADAPTER
  468. sizeof                     EQU *                    ; size:   $8 (8)
  469.                         ENDR
  470. SSGetStatusPB            RECORD 0
  471. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  472. socket                     ds.w    1                ; offset: $2 (2)        ;     SS_SOCKET
  473. cardState                 ds.b    1                ; offset: $4 (4)        ;     SS_FLAGS8
  474. socketState                 ds.b    1                ; offset: $5 (5)        ;     SS_FLAGS8
  475. ctlInd                     ds.b    1                ; offset: $6 (6)        ;     SS_FLAGS8
  476. ireqRouting                 ds.b    1                ; offset: $7 (7)        ;     SS_IRQ
  477. ifType                     ds.b    1                ; offset: $8 (8)        ;     SS_FLAGS8
  478. padding                     ds.b    1                ; offset: $9 (9) <-- really an array of length one ;     
  479. sizeof                     EQU *                    ; size:   $A (10)
  480.                         ENDR
  481. SSGetVendorInfoPB        RECORD 0
  482. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  483. vendorInfoType             ds.b    1                ; offset: $2 (2)        ;     SS_BYTE
  484. reserved                 ds.b    1                ; offset: $3 (3)        ;     padding
  485. buffer                     ds.l    1                ; offset: $4 (4)        ;     SS_PTR
  486. release                     ds.w    1                ; offset: $8 (8)        ;     SS_BCD
  487. sizeof                     EQU *                    ; size:   $A (10)
  488.                         ENDR
  489. SSInquireAdapterPB        RECORD 0
  490. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  491. buffer                     ds.l    1                ; offset: $2 (2)        ;     SS_PTR
  492. numSockets                 ds.w    1                ; offset: $6 (6)        ;     SS_COUNT
  493. numWindows                 ds.w    1                ; offset: $8 (8)        ;     SS_COUNT
  494. numEDCs                     ds.w    1                ; offset: $A (10)        ;     SS_COUNT
  495. sizeof                     EQU *                    ; size:   $C (12)
  496.                         ENDR
  497. SSInquireEDCPB            RECORD 0
  498. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  499. edc                         ds.w    1                ; offset: $2 (2)        ;     SS_EDC
  500. sockets                     ds.w    1                ; offset: $4 (4)        ;     SS_SKTBITS
  501. caps                     ds.b    1                ; offset: $6 (6)        ;     SS_FLAGS8
  502. types                     ds.b    1                ; offset: $7 (7)        ;     SS_FLAGS8
  503. sizeof                     EQU *                    ; size:   $8 (8)
  504.                         ENDR
  505. SSInquireSocketPB        RECORD 0
  506. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  507. socket                     ds.w    1                ; offset: $2 (2)        ;     SS_SOCKET
  508. buffer                     ds.l    1                ; offset: $4 (4)        ;     SS_PTR
  509. scIntCaps                 ds.b    1                ; offset: $8 (8)        ;     SS_FLAGS8
  510. scRptCaps                 ds.b    1                ; offset: $9 (9)        ;     SS_FLAGS8
  511. ctlIndCaps                 ds.b    1                ; offset: $A (10)        ;     SS_FLAGS8
  512. padding                     ds.b    1                ; offset: $B (11) <-- really an array of length one ;     
  513. sizeof                     EQU *                    ; size:   $C (12)
  514.                         ENDR
  515. SSInquireWindowPB        RECORD 0
  516. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  517. window                     ds.w    1                ; offset: $2 (2)        ;     SS_WINDOW
  518. buffer                     ds.l    1                ; offset: $4 (4)        ;     SS_PTR
  519. wndCaps                     ds.b    1                ; offset: $8 (8)        ;     SS_FLAGS8
  520. reserved                 ds.b    1                ; offset: $9 (9)        ;     padding
  521. sockets                     ds.w    1                ; offset: $A (10)        ;     SS_SKTBITS
  522. sizeof                     EQU *                    ; size:   $C (12)
  523.                         ENDR
  524. SSPauseEDCPB            RECORD 0
  525. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  526. edc                         ds.w    1                ; offset: $2 (2)        ;     SS_EDC
  527. sizeof                     EQU *                    ; size:   $4 (4)
  528.                         ENDR
  529. SSReadEDCPB                RECORD 0
  530. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  531. edc                         ds.w    1                ; offset: $2 (2)        ;     SS_EDC
  532. value                     ds.w    1                ; offset: $4 (4)        ;     SS_WORD
  533. sizeof                     EQU *                    ; size:   $6 (6)
  534.                         ENDR
  535. SSResetSocketPB            RECORD 0
  536. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  537. socket                     ds.w    1                ; offset: $2 (2)        ;     SS_SOCKET
  538. sizeof                     EQU *                    ; size:   $4 (4)
  539.                         ENDR
  540. SSResumeEDCPB            RECORD 0
  541. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  542. edc                         ds.w    1                ; offset: $2 (2)        ;     SS_EDC
  543. sizeof                     EQU *                    ; size:   $4 (4)
  544.                         ENDR
  545. SSStartEDCPB            RECORD 0
  546. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  547. edc                         ds.w    1                ; offset: $2 (2)        ;     SS_EDC
  548. sizeof                     EQU *                    ; size:   $4 (4)
  549.                         ENDR
  550. SSStopEDCPB                RECORD 0
  551. adapter                     ds.w    1                ; offset: $0 (0)        ;     SS_ADAPTER
  552. edc                         ds.w    1                ; offset: $2 (2)        ;     SS_EDC
  553. sizeof                     EQU *                    ; size:   $4 (4)
  554.                         ENDR
  555. SSVendorSpecificPB        RECORD 0
  556. vsFunction                 ds.w    1                ; offset: $0 (0)        ;     SS_WORD
  557. adapter                     ds.w    1                ; offset: $2 (2)        ;     SS_ADAPTER
  558. socket                     ds.w    1                ; offset: $4 (4)        ;     SS_SOCKET
  559. bufferSize                 ds.w    1                ; offset: $6 (6)        ;     SS_WORD
  560. buffer                     ds.l    1                ; offset: $8 (8)        ;     SS_PTR
  561. attributes                 ds.l    1                ; offset: $C (12)        ;     SS_LONG
  562. sizeof                     EQU *                    ; size:   $10 (16)
  563.                         ENDR
  564. ;     ‘attributes’ constants 
  565.  
  566. kSSGoingToSleep                    EQU        $00000001
  567. kSSWakingFromSleep                EQU        $00000002
  568. ; ————————————————————————————————————————————————————————————————————————
  569. ;    Non-specific Socket Services Functions
  570. ;————————————————————————————————————————————————————————————————————————
  571.  
  572. ;
  573. ; pascal SS_RETCODE SSGetAdapterCount(SSGetAdapterCountPB *pb, Ptr dataPtr)
  574. ;
  575.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  576.         IMPORT_CFM_FUNCTION SSGetAdapterCount
  577.     ENDIF
  578.  
  579. ; ————————————————————————————————————————————————————————————————————————
  580. ;    Adapter Functions
  581. ;————————————————————————————————————————————————————————————————————————
  582.  
  583. ;
  584. ; pascal SS_RETCODE SSAcknowledgeInterrupt(SSAcknowledgeInterruptPB *pb, Ptr dataPtr)
  585. ;
  586.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  587.         IMPORT_CFM_FUNCTION SSAcknowledgeInterrupt
  588.     ENDIF
  589.  
  590. ;
  591. ; pascal SS_RETCODE SSGetSetPriorHandler(SSGetSetPriorHandlerPB *pb, Ptr dataPtr)
  592. ;
  593.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  594.         IMPORT_CFM_FUNCTION SSGetSetPriorHandler
  595.     ENDIF
  596.  
  597. ;
  598. ; pascal SS_RETCODE SSGetSetSSAddr(SSGetSetSSAddrPB *pb, Ptr dataPtr)
  599. ;
  600.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  601.         IMPORT_CFM_FUNCTION SSGetSetSSAddr
  602.     ENDIF
  603.  
  604. ;
  605. ; pascal SS_RETCODE SSGetAccessOffsets(SSGetAccessOffsetsPB *pb, Ptr dataPtr)
  606. ;
  607.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  608.         IMPORT_CFM_FUNCTION SSGetAccessOffsets
  609.     ENDIF
  610.  
  611. ;
  612. ; pascal SS_RETCODE SSGetAdapter(SSGetSetAdapterPB *pb, Ptr dataPtr)
  613. ;
  614.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  615.         IMPORT_CFM_FUNCTION SSGetAdapter
  616.     ENDIF
  617.  
  618. ;
  619. ; pascal SS_RETCODE SSGetSSInfo(SSGetSSInfoPB *pb, Ptr dataPtr)
  620. ;
  621.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  622.         IMPORT_CFM_FUNCTION SSGetSSInfo
  623.     ENDIF
  624.  
  625. ;
  626. ; pascal SS_RETCODE SSGetVendorInfo(SSGetVendorInfoPB *pb, Ptr dataPtr)
  627. ;
  628.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  629.         IMPORT_CFM_FUNCTION SSGetVendorInfo
  630.     ENDIF
  631.  
  632. ;
  633. ; pascal SS_RETCODE SSInquireAdapter(SSInquireAdapterPB *pb, Ptr dataPtr)
  634. ;
  635.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  636.         IMPORT_CFM_FUNCTION SSInquireAdapter
  637.     ENDIF
  638.  
  639. ;
  640. ; pascal SS_RETCODE SSSetAdapter(SSGetSetAdapterPB *pb, Ptr dataPtr)
  641. ;
  642.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  643.         IMPORT_CFM_FUNCTION SSSetAdapter
  644.     ENDIF
  645.  
  646. ;
  647. ; pascal SS_RETCODE SSVendorSpecific(SSVendorSpecificPB *pb, Ptr dataPtr)
  648. ;
  649.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  650.         IMPORT_CFM_FUNCTION SSVendorSpecific
  651.     ENDIF
  652.  
  653. ; ————————————————————————————————————————————————————————————————————————
  654. ;    Socket Functions
  655. ;————————————————————————————————————————————————————————————————————————
  656.  
  657. ;
  658. ; pascal SS_RETCODE SSGetSocket(SSGetSetSocketPB *pb, Ptr dataPtr)
  659. ;
  660.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  661.         IMPORT_CFM_FUNCTION SSGetSocket
  662.     ENDIF
  663.  
  664. ;
  665. ; pascal SS_RETCODE SSGetStatus(SSGetStatusPB *pb, Ptr dataPtr)
  666. ;
  667.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  668.         IMPORT_CFM_FUNCTION SSGetStatus
  669.     ENDIF
  670.  
  671. ;
  672. ; pascal SS_RETCODE SSInquireSocket(SSInquireSocketPB *pb, Ptr dataPtr)
  673. ;
  674.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  675.         IMPORT_CFM_FUNCTION SSInquireSocket
  676.     ENDIF
  677.  
  678. ;
  679. ; pascal SS_RETCODE SSResetSocket(SSResetSocketPB *pb, Ptr dataPtr)
  680. ;
  681.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  682.         IMPORT_CFM_FUNCTION SSResetSocket
  683.     ENDIF
  684.  
  685. ;
  686. ; pascal SS_RETCODE SSSetSocket(SSGetSetSocketPB *pb, Ptr dataPtr)
  687. ;
  688.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  689.         IMPORT_CFM_FUNCTION SSSetSocket
  690.     ENDIF
  691.  
  692. ; ————————————————————————————————————————————————————————————————————————
  693. ;    Window Functions
  694. ;————————————————————————————————————————————————————————————————————————
  695.  
  696. ;
  697. ; pascal SS_RETCODE SSGetPage(SSGetSetPagePB *pb, Ptr dataPtr)
  698. ;
  699.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  700.         IMPORT_CFM_FUNCTION SSGetPage
  701.     ENDIF
  702.  
  703. ;
  704. ; pascal SS_RETCODE SSGetWindow(SSGetSetWindowPB *pb, Ptr dataPtr)
  705. ;
  706.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  707.         IMPORT_CFM_FUNCTION SSGetWindow
  708.     ENDIF
  709.  
  710. ;
  711. ; pascal SS_RETCODE SSInquireWindow(SSInquireWindowPB *pb, Ptr dataPtr)
  712. ;
  713.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  714.         IMPORT_CFM_FUNCTION SSInquireWindow
  715.     ENDIF
  716.  
  717. ;
  718. ; pascal SS_RETCODE SSSetPage(SSGetSetPagePB *pb, Ptr dataPtr)
  719. ;
  720.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  721.         IMPORT_CFM_FUNCTION SSSetPage
  722.     ENDIF
  723.  
  724. ;
  725. ; pascal SS_RETCODE SSSetWindow(SSGetSetWindowPB *pb, Ptr dataPtr)
  726. ;
  727.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  728.         IMPORT_CFM_FUNCTION SSSetWindow
  729.     ENDIF
  730.  
  731. ; ————————————————————————————————————————————————————————————————————————
  732. ;    Error Detection Functions
  733. ;————————————————————————————————————————————————————————————————————————
  734.  
  735. ;
  736. ; pascal SS_RETCODE SSGetEDC(SSGetSetEDCPB *pb, Ptr dataPtr)
  737. ;
  738.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  739.         IMPORT_CFM_FUNCTION SSGetEDC
  740.     ENDIF
  741.  
  742. ;
  743. ; pascal SS_RETCODE SSInquireEDC(SSInquireEDCPB *pb, Ptr dataPtr)
  744. ;
  745.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  746.         IMPORT_CFM_FUNCTION SSInquireEDC
  747.     ENDIF
  748.  
  749. ;
  750. ; pascal SS_RETCODE SSPauseEDC(SSPauseEDCPB *pb, Ptr dataPtr)
  751. ;
  752.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  753.         IMPORT_CFM_FUNCTION SSPauseEDC
  754.     ENDIF
  755.  
  756. ;
  757. ; pascal SS_RETCODE SSReadEDC(SSReadEDCPB *pb, Ptr dataPtr)
  758. ;
  759.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  760.         IMPORT_CFM_FUNCTION SSReadEDC
  761.     ENDIF
  762.  
  763. ;
  764. ; pascal SS_RETCODE SSResumeEDC(SSResumeEDCPB *pb, Ptr dataPtr)
  765. ;
  766.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  767.         IMPORT_CFM_FUNCTION SSResumeEDC
  768.     ENDIF
  769.  
  770. ;
  771. ; pascal SS_RETCODE SSSetEDC(SSGetSetEDCPB *pb, Ptr dataPtr)
  772. ;
  773.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  774.         IMPORT_CFM_FUNCTION SSSetEDC
  775.     ENDIF
  776.  
  777. ;
  778. ; pascal SS_RETCODE SSStartEDC(SSStartEDCPB *pb, Ptr dataPtr)
  779. ;
  780.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  781.         IMPORT_CFM_FUNCTION SSStartEDC
  782.     ENDIF
  783.  
  784. ;
  785. ; pascal SS_RETCODE SSStopEDC(SSStopEDCPB *pb, Ptr dataPtr)
  786. ;
  787.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  788.         IMPORT_CFM_FUNCTION SSStopEDC
  789.     ENDIF
  790.  
  791.  
  792.     ENDIF ; __SOCKETSERVICES__ 
  793.  
  794.